IF EXISTS (SELECT * from dbo.sysobjects WHERE id = object_id(N'[dbo].[SelectEnvioByIdPedido]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[SelectEnvioByIdPedido]
GO

CREATE PROCEDURE [dbo].[SelectEnvioByIdPedido]
(
	@IdPedido int
)
AS
BEGIN
	SET NOCOUNT ON

	SELECT
	[IdPedido],
	[Costo],
	[FechaEnvio],
	[IdDistrito],
	[Direccion],
	[Comentario],
	[Estado]
	FROM [Envio]
	WHERE [IdPedido] = @IdPedido

	SET NOCOUNT OFF
END

GO
